
import java.util.*;public class practice7
{
	public static String practice (String a)
	{Scanner in=new Scanner(System.in);
	String b=in.nextLine();
	a=a.concat(b);
		b=b.concat(a);
		return b;
	}
	public static void main(String[] args)
	{
		Scanner in=new Scanner(System.in);
		String b=in.nextLine();
		String c=practice(b);//传入的只是值，不会改变外面的值
		System.out.println(c);
		System.out.println(b);
	}
}
